<template>
	<view class="content">
		<view class="title">{{shopName}}</view>
		<view class="qrimg">
		    <image :src="imageurl" mode="scaleToFill"></image>
		</view>
		<view class="tip">请使用微信扫码向商家付款</view>
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex';
	// import tkiQrcode from "@/components/tki-qrcode/tki-qrcode.vue"
	export default {
		// components: {tkiQrcode},
		data() {
			return {
				val:'',
				icon:'https://nkyzapi.njkw668.com/static/logo.png',
				id:0,
				shopName:'',
				imageurl:""
			}
		},
		onLoad(options){
			this.id = options.id;
			this.loadData();
		},
		methods: {
			loadData(){
				this.$api.get({
					url: '/wanlshop/Small/shopinfoperson',
					data:{
						'loaclhost_id':this.id
					},
					success: res => {
						this.shopName = res.shop_name;
						this.imageurl=res.collection_qrcode_image;
						}
						})
				
				// this.$http.get('/MerchantDetail',{"id": this.id}).then(res=>{
				// 	this.shopName = res.data.info.Name;
				// 	this.val = 'ihuaxia,1,' + '/pages/merchant/pay?id=' + this.id;
				// })
			},
		}
	}
</script>

<style lang='scss'>
	.qrimg{
		display: flex;
		height: 600upx;
		justify-content: center;
		padding-top: 40upx;
		.image{
			width: 100%;
			height: 100%;
		}
	}
	.content{
		display: flex;
		flex-direction: column; 
		justify-content: center;
		align-items: center;
	}
	.title{
		font-size: $font-lg;
	}
	.tip{
		font-size: $font-sm;
	}
</style>
